'''
Created on 2011-06-28

@author: Mikael
'''
from Model.Helper.IntrospectionHelper import GetAllVariableWithoutUnderscore
from Model.GenericNode import GenericNode


def initializeType():
    
    varList = GetAllVariableWithoutUnderscore(ResourceType)
    ResourceType.sTypeArray = {}
    for varNameStr in varList:
        if varNameStr != "sIsInit":
            ResourceType.sTypeArray[getattr(ResourceType, varNameStr)] = varNameStr;
            

def getTypeStr(typeidx):
        if not ResourceType.sIsInit:
            ResourceType.sIsInit = 1
            initializeType()
        
        return ResourceType.sTypeArray[typeidx];


class ResourceType:
    Material = 0
    Texture = 1
    Effect = 2
    Scene = 3
    
    sIsInit = 0
    sString_TypeDic = None


class Resource(object):
    def __init__(self, type=0, guid=""):
        self.mType = type
        self.mGUID = guid
        
        #super()
